﻿<%@ Page Title="" Language="C#" MasterPageFile="~/manager.Master" AutoEventWireup="true" CodeBehind="Add_type_bus.aspx.cs" Inherits="Bus_proj.website.Add_type_bus" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">    

    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 456px;
        }
         .el02 { /* Text and background colour, blue on light gray */
        
        background-color:#B0E0E6;
        border: 1px double #00CED1; 
        border-radius: 5px;         
        color:#2F4F4F;      
        outline: none; 
        }
  .el03 { /* Text and background colour, blue on light gray */
        
        background-color:#FFFAFA;
        border: 1px double #00CED1; 
        border-radius: 5px;       
        color:#2F4F4F;      
        outline: none; 
        }
        .classname {
	-moz-box-shadow:inset 0px 1px 0px 0px #259cc7;
	-webkit-box-shadow:inset 0px 1px 0px 0px #259cc7;
	box-shadow:inset 0px 1px 0px 0px #259cc7;
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#383838', endColorstr='#000000',GradientType=0);
	background-color:#383838;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:6px;
	border:1px solid #0c1396;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:arial;
	font-size:15px;
	font-weight:bold;
	padding:6px 24px;
	text-decoration:none;
	text-shadow:0px 1px 0px #1b37c2;
    margin-left: 0px;
    margin-right: 0px;
}
.classname:hover {
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #000000), color-stop(1, #383838));
	background:-moz-linear-gradient(top, #000000 5%, #383838 100%);
	background:-webkit-linear-gradient(top, #000000 5%, #383838 100%);
	background:-o-linear-gradient(top, #000000 5%, #383838 100%);
	background:-ms-linear-gradient(top, #000000 5%, #383838 100%);
	background:linear-gradient(to bottom, #000000 5%, #383838 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#000000', endColorstr='#383838',GradientType=0);
	background-color:#000000;

}.classname:active {
	position:relative;
	top:1px;

}
 .textbox { 
    background: white; 
    border: 1px double #DDD; 
    border-radius: 5px; 
    box-shadow: 0 0 5px #333; 
    color: #666; 
    outline: none; 
    } 
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Panel ID="Panel1" runat="server">
    <fieldset class="el02">
    <legend>เพิ่มข้อมูลประเภทรถ</legend>
        <table class="style1">
            <tr>
                <td align="right" class="style2">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right" class="style2">
                    <asp:Label ID="Label1" runat="server" Text="ชื่อประเภทรถโดยสาร :"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBox1" runat="server" CssClass="textbox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" class="style2">
                    <asp:Label ID="Label2" runat="server" Text="จำนวนที่นั่งแนวตั้ง :"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBox2" runat="server" Height="22px" TextMode="Number" 
                        Width="62px" CssClass="textbox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" class="style2">
                    <asp:Label ID="Label3" runat="server" Text="จำนวนที่นั่งแนวนอน :"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBox3" runat="server" Height="22px" TextMode="Number" 
                        Width="62px" CssClass="textbox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" class="style2">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right" class="style2">
                    &nbsp;</td>
                <td>
                    <asp:Button ID="Button1" runat="server" Height="32px" Text="เพิ่ม" 
                        Width="86px" onclick="Button1_Click" CssClass="classname" />
                </td>
            </tr>
            <tr>
                <td align="right" class="style2">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
        </fieldset>
    </asp:Panel>
    <asp:Panel ID="Panel2" runat="server">
    <fieldset class="el03">
    <legend>ข้อมูลประเภทรถทั้งหมด</legend>
        <table class="style1">
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="center" colspan="2">
                    <asp:GridView ID="GridView1" runat="server" BackColor="White" 
                        BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                        ForeColor="Black" GridLines="Vertical" AllowPaging="True" 
                        AutoGenerateColumns="False" DataKeyNames="Type_Bus_id" 
                        DataSourceID="LinqDataSource1" onrowcommand="GridView1_RowCommand">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:BoundField DataField="Type_Bus_id" HeaderText="รหัสประเภทรถ" 
                                ReadOnly="True" SortExpression="Type_Bus_id" />
                            <asp:BoundField DataField="Type_Bus_name" HeaderText="ชื่อประเภทรถ" 
                                SortExpression="Type_Bus_name" />
                            <asp:BoundField DataField="Type_Bus_number" HeaderText="จำนวนที่นั่งรวม" 
                                SortExpression="Type_Bus_number" />
                            <asp:BoundField DataField="Type_Bus_seat_colum" 
                                HeaderText="จำนวนที่นั่งแนวตั้ง" SortExpression="Type_Bus_seat_colum" />
                            <asp:BoundField DataField="Type_Bus_seat_row" HeaderText="จำนวนที่นั่งแนวนอน" 
                                SortExpression="Type_Bus_seat_row" />
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:ImageButton ID="ImageButton1" runat="server" Height="19px" 
                                        ImageUrl="~/Images/delete-icon.png" Width="22px" CommandName="cmdY" CommandArgument='<%#Eval("Type_Bus_id") %>'/>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#CCCC99" />
                        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                        <RowStyle BackColor="#F7F7DE" />
                        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                        <SortedAscendingCellStyle BackColor="#FBFBF2" />
                        <SortedAscendingHeaderStyle BackColor="#848384" />
                        <SortedDescendingCellStyle BackColor="#EAEAD3" />
                        <SortedDescendingHeaderStyle BackColor="#575357" />
                    </asp:GridView>
                    <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
                        ContextTypeName="Bus_proj.DataClasses1DataContext" EntityTypeName="" 
                        TableName="Table_Type_Bus">
                    </asp:LinqDataSource>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
      </fieldset>
    </asp:Panel>
</asp:Content>
